Skip to content

fix(cli): fix flaky tests#9560

Closed
alex-alecu wants to merge 20 commits intomainfrom
fix/provider-plugin-ci-flake
Closed

fix(cli): fix flaky tests#9560
alex-alecu wants to merge 20 commits intomainfrom
fix/provider-plugin-ci-flake

Conversation

@alex-alecu
Copy link
Copy Markdown
Contributor

@alex-alecu alex-alecu commented Apr 27, 2026

Stabilizes the provider plugin test by mirroring upstream OpenCode's fixture fix instead of changing plugin initialization behavior.

This ports the approach from anomalyco/opencode#24416: mark the project and global plugin config directories as dependency-ready so the provider persistence test exercises plugin/provider state rather than waiting on real npm install timing. Kilo writes @kilocode/plugin in that fixture because our config dependency package name differs from upstream's @opencode-ai/plugin.

This was not already present from recent upstream-related merges because those updates did not include OpenCode commit 179e540ccb556fc48934a5a34bbd0920c8af87b4 from anomalyco/opencode#24416. That upstream fix merged on Apr 26 after the provider/test code we had synced or cherry-picked, so Kilo still had the older test fixture and reproduced the CI timeout until this PR ported the small targeted change.

The final runtime diff avoids packages/opencode/src/plugin/index.ts; the remaining implementation changes are the upstream-aligned provider test fixture plus a small Windows flock release retry for transient lock-directory deletion failures seen in CI.

@alex-alecu alex-alecu changed the title fix(cli): avoid provider test flake fix(cli): fix flaky tests Apr 27, 2026
Comment thread packages/opencode/src/session/prompt.ts
Comment thread packages/opencode/src/session/prompt.ts Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 27, 2026

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/effect/runner.ts 163 Cancelled shells now hide unrelated cleanup failures.
packages/opencode/src/session/prompt.ts 747 The interrupt mask still makes shell preflight steps non-cancellable, so a stuck cleanup or shell.env hook can leave cancellation hanging indefinitely.
packages/opencode/src/session/prompt.ts 934 Signal-terminated shell commands are still treated as successful runs even when the user did not cancel them.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

None.

Files Reviewed (4 files)
  • packages/opencode/src/effect/runner.ts - 1 issue
  • packages/opencode/src/plugin/index.ts - 0 issues
  • packages/opencode/src/session/prompt.ts - 2 issues
  • packages/opencode/test/provider/provider.test.ts - 0 issues

Fix these issues in Kilo Cloud


Reviewed by gpt-5.4-2026-03-05 · 1,615,673 tokens

Comment thread packages/opencode/src/effect/runner.ts Outdated
Comment thread packages/opencode/src/session/prompt.ts Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 27, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/effect/runner.ts 163 Cancelled shells now hide unrelated cleanup failures
packages/opencode/src/session/prompt.ts 934 Signal-terminated shell commands are treated as successful runs
Other Observations (not in diff)

None.

Files Reviewed (4 files)
  • packages/opencode/src/effect/runner.ts - 1 issue
  • packages/opencode/src/plugin/index.ts - 0 issues
  • packages/opencode/src/session/prompt.ts - 1 issue
  • packages/opencode/test/provider/provider.test.ts - 0 issues

Reviewed by gpt-5.4-2026-03-05 · 950,378 tokens

Comment thread packages/opencode/src/plugin/index.ts Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 27, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/opencode/src/plugin/index.ts
  • packages/opencode/test/provider/provider.test.ts

Reviewed by gpt-5.5-2026-04-23 · 3,592,526 tokens

Comment thread packages/opencode/src/session/prompt.ts Outdated
Comment thread packages/opencode/src/plugin/index.ts Outdated
@alex-alecu
Copy link
Copy Markdown
Contributor Author

alex-alecu commented Apr 28, 2026

Closing in favor of a clean replacement PR that starts from origin/main and contains only the upstream provider-test fixture fix from anomalyco/opencode#24416 (plus Kilo-required package/annotation adaptation).

Fixed here #9600

@alex-alecu alex-alecu closed this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant